package com.amoyt.project.domain.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 文章主表
 * </p>
 *
 * @author AmoyT
 * @since 2025-08-25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@Schema(description = "文章主表")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "文章ID")
    @TableId(value = "article_id", type = IdType.INPUT)
    private String articleId;

    @Schema(description = "关联项目 id，默认为null")
    private String projectId;

    @TableField(exist = false)
    // 新增临时字段，用于接收分组统计的数量 (表示数据库表中不存在该字段)
    private Long categoryCount;

    @Schema(description = "文章标题")
    private String articleTitle;

    @Schema(description = "图片标题")
    private String imageTitle;

    @Schema(description = "分类(1-公示公告,2-通知公告,3-意见征集公告,4-新闻发布)")
    private Integer category;

    @Schema(description = "公示人ID")
    private String publisherId;

    @Schema(description = "公示人姓名")
    private String publisherName;

    @Schema(description = "公示单位")
    private String publishUnit;

    @Schema(description = "发布状态(0-草稿,1-已发布)")
    private Integer isPublished;

    @Schema(description = "发布时间")
    private LocalDateTime publishTime;

    @Schema(description = "是否公开信息(0-默认不公开，1-公开)")
    private Integer isOpen;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    private String updateBy;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "逻辑删除字段")
    private Integer deleted;

}
